using System;
using Android.Content;
using SpotOffer.Droid.Share;
using SpotOffer.Utils;
using Xamarin.Forms;

[assembly: Dependency(typeof(ShareImplementation))]
namespace SpotOffer.Droid.Share
{
    public class ShareImplementation : IShare
    {
      
		public static void Init() 
		{ 
		}


        public void ShareStatus(string status)
		{
			var intent = new Intent(global::Android.Content.Intent.ActionSend);
			intent.PutExtra(global::Android.Content.Intent.ExtraText,/* String.Format("{0} - {1}",title ?? string.Empty,status ?? string.Empty)*/status);
			//intent.PutExtra(global::Android.Content.Intent.ExtraTitle, title ?? string.Empty);
			intent.SetType("text/plain");
			intent.SetFlags(ActivityFlags.ClearTop);
			intent.SetFlags(ActivityFlags.NewTask);
			Android.App.Application.Context.StartActivity(intent);
		}
       /* public void ShareStatus(string title, string status, string link)
        {
            var intent = new Intent(global::Android.Content.Intent.ActionSend);
            intent.PutExtra(global::Android.Content.Intent.ExtraText, String.Format("{0} - {1} - {2}", title ?? string.Empty, status ?? string.Empty,link ?? string.Empty));
            //intent.PutExtra(global::Android.Content.Intent.ExtraTitle, title ?? string.Empty);
            intent.SetType("text/plain");
            intent.SetFlags(ActivityFlags.ClearTop);
            intent.SetFlags(ActivityFlags.NewTask);
            Android.App.Application.Context.StartActivity(intent);
        }*/
    }
}
